package com.hz.eduService.service;

import com.hz.eduService.domain.Course;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * @author li
 * @description 针对表【courses(课程表)】的数据库操作Service
 * @createDate 2023-09-23 17:13:58
 */
public interface CourseService extends IService<Course> {
    /**
     * 查看课程
     *
     * @return
     */
    List<Course> searchAllCourses();


    Course searchCourseByCode(String courseCode);

    Course simpleInfoCourse(Course course);


    /**
     * 添加课程
     *
     * @param courseName
     * @param courseCode
     * @param teacherId
     * @param teacherRealName
     * @param sectionCount
     * @param courseTime
     * @param maxStudentCount
     * @param courseProfile
     * @param textbook
     * @param creditsCount
     * @param allScore
     * @param passScore
     * @param isDeleted
     * @return
     */
    int addCourse(String courseName, String courseCode, Integer teacherId, Integer sectionCount,
                  String courseTime, Integer maxStudentCount, String courseProfile, String textbook, Integer creditsCount,
                  Integer allScore, Integer passScore, Integer isDeleted);

    /**
     * 编辑课程
     *
     * @param course@return
     */
    boolean editCourse(Course course);

    /**
     * 删除课程
     *
     * @param id
     * @param teacherUserId
     * @return
     */
    boolean deleteCourse(Integer id);

    /**
     * 查看课程
     *
     * @param id
     * @return
     */
    Course viewCourse(Integer id);

    /**
     * 查看老师所教的课程
     *
     * @param teacherId
     * @return
     */
    List<Course> searchTeacherCourses(Integer teacherId);
}

